#ifndef __SCRIPT__
#define __SCRIPT__

/* Include files. */

/* Macro constant definitions. */

#define MAX_SCRIPT_LEN 			(1024 * 4)
#define MAX_SCRIPT_RESULT_LEN 	(1024 * 32)

/* Type definitions. */

typedef enum 
{
	e_ASYNC = 0,
	e_SYNC = 1,
	e_KILL = 2,
}e_shell_type;

class event;
struct script 
{
	event *ev;
	int len;
	unsigned int type;
	unsigned int finish;
	unsigned int pid;
	int code;
	char data[0];
};

/* External variable declarations. */

/* External function declarations. */

/* Macro API definitions. */

void recvScriptResult();
int luaIfconfig(lua_State *L);
int luaShellAsync(lua_State *L); 
int luaShellSync(lua_State *L); 
int luaShellKill(lua_State *L); 

#endif

